package _thread_lock._futurepattern._future2;

/**
 * @Author: huangya
 * @Date: 2020/10/27
 * @Description:
 */
public class Test123 {
    public static void main(String[] args) {
        Future<String> ttt = new FutureTask<>();
        new ExecuteServiceImpl().submit(new Task<String>() {
            @Override
            public String exec() {
                return "test1";
            }
        }, ttt);
        String s = ttt.get();
        System.out.println(s);
    }
}
